package com.lww.feature.test.sort;

import java.math.BigDecimal;

/**
 * User: yian
 * Date: 2017/5/11
 */
public class Foo {
    private int id;
    private String name;
    private BigDecimal targetCost;
    private BigDecimal actualCost;

    public Foo(int id, String name, BigDecimal targetCost, BigDecimal actualCost) {
        this.id = id;
        this.name = name;
        this.targetCost = targetCost;
        this.actualCost = actualCost;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getTargetCost() {
        return targetCost;
    }

    public void setTargetCost(BigDecimal targetCost) {
        this.targetCost = targetCost;
    }

    public BigDecimal getActualCost() {
        return actualCost;
    }

    public void setActualCost(BigDecimal actualCost) {
        this.actualCost = actualCost;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("  \"id\":").append(id);
        sb.append(", \"name\":\"").append(name).append('\"');
        sb.append(", \"targetCost\":").append(targetCost);
        sb.append(", \"actualCost\":").append(actualCost);
        sb.append('}');
        return sb.toString();
    }
}
